package com.threeti.mecool.core.application.message;

import com.threeti.mecool.core.domain.model.message.SystemMessage;
import com.threeti.mecool.core.exception.MessageSendException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface SystemMessageService {
    void send(SystemMessage systemMessage) throws MessageSendException;

    void send(String creator, String receiver, String head, String body) throws MessageSendException;

    Page<SystemMessage> findUnreadMessages(String userLoginName, Pageable pageable);

    Page<SystemMessage> findAllMessages(String userLoginName, Pageable pageable);

    void markMessagesAsRead(long... messageIdArray);
}
